<form id="company_info" method="post">
    <div align="center">
        <div>
            <input type="hidden" name="id" value="${company.id}">
            <label>公司名称:</label>
            <input class="easyui-validatebox" type="text" name="companyName" value="${company.companyName}"
                   data-options="required:true"/>
        </div>
        <div style="margin-top: 10px;">
            <label>公司性质:</label>
            <select class="easyui-combobox" name="companyXingzhi" style="width:135px;">
            <@dict type="gsxz">
                <#list labels as label>
                    <#if label.label_value == company.companyXingzhi>
                        <option value="${label.label_value}" selected>${label.label_name}</option>
                    </#if>
                    <#if label.label_value != company.companyXingzhi>
                        <option value="${label.label_value}">${label.label_name}</option>
                    </#if>
                </#list>
            </@dict>
            </select>
        </div>
        <div style="margin-top: 10px;">
            <label for="name">注册资金:</label>
            <input class="easyui-numberbox" type=" text" name="companyMoney" value="${company.companyMoney}"
                   data-options="min:0,precision:2,suffix:'万',
            required:true"/>
        </div>
        <div style="margin-top: 10px;">
            <label for="name">注册时间:</label>
            <input class="easyui-datebox" type="text" name="companyCreateTime" value="${company.companyCreateTime}"
                   data-options="required:true"/>
        </div>
        <div style="margin-top: 10px;">
            <label for="name">注册地址:</label>
            <input class="easyui-validatebox" type="text" name="companyAddress" value="${company.companyAddress}"
                   data-options="required:true"/>
        </div>
        <div style="margin-top: 10px;">
            <label for="name">经营范围:</label>
        <@dict type="jyfw">
            <#list labels as label>
                <#list company.companyRange?split(",") as range>
                    <#if range == label.label_name>
                        <input type="checkbox" name="companyRange" id="${label.label_value}" value="${label.label_name}" checked/><label for="${label.label_value}">${label.label_name}</label>
                        <#break >
                    </#if>
                    <#if label.label_name != range>
                        <input type="checkbox" name="companyRange" id="${label.label_value}" value="${label.label_name}" /><label for="${label.label_value}">${label.label_name}</label>
                        <#break >
                    </#if>
                </#list>
            </#list>
        </@dict>
        </div>
        <div align="center" style="margin-top: 10px;">
            <button onclick="commit" href="#" class="easyui-linkbutton" data-options="iconCls:'icon-ok'">保存</button>
        </div>
    </div>
</form>
<script>
    var companyInfo = $('#company_info');
    companyInfo.form({
        url: '${ctx}/offer/editCompany',
        onSubmit: function () {
            return companyInfo.form('validate') ? true : false;
        },
        success: function (data) {
            parent.$.modalDialog.openner.datagrid('reload');
            parent.$.modalDialog.handler.dialog('close');
        }
    });
    function commit() {
        companyInfo.submit();
    }

</script>
